﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace HospitalAdmision
{
    public partial class FormPrincipal : Form
    {
        public FormPrincipal()
        {
            InitializeComponent();
        }
        int idUs=0;
        
        private void admisiónToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            //Muestra el formulario llamado Admision
            FormAdmision frmadmision = new FormAdmision();
            frmadmision.recibeId(idUs);
            frmadmision.Show(); //Muestra el formulario de Admision
        }

        private void administraciónToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Abre el formulario de administracion y cierra el formuulario actual
            f_inicioAdm fi = new f_inicioAdm();
            fi.Show();
        }

        private void farmaciaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            formFarmacia ff = new formFarmacia();
            ff.recibeId(idUs);
            ff.Show();
        }

        private void sanitarioToolStripMenuItem_Click(object sender, EventArgs e)
        {
            F_prescpricion fp = new F_prescpricion();
            fp.recibeId(idUs);
            fp.Show();
        }

        private void dieteticaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            F_dietetica fd = new F_dietetica();
            fd.recibeId(idUs);
            fd.Show();
        }

        private void cocinaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            F_Cocina fc = new F_Cocina();
            fc.recibeId(idUs);
            fc.Show();
        }

        public void recibeId(int id)
        {
            idUs = id;
        }

        private void FormPrincipal_FormClosed(object sender, FormClosedEventArgs e)
        {
            FormIngreso fi = new FormIngreso();
            fi.Show();
        }
    }
}
